//
//  TopWindowViewController.m
//  MVVM+RAC
//
//  Created by bopeng on 16/5/30.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "TopWindowViewController.h"


@interface TopWindowViewController ()

@end

@implementation TopWindowViewController

+ (instancetype)sharedInstance
{
    static TopWindowViewController* instance = nil;

    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [TopWindowViewController new];
    });

    return instance;
}

#warning 此方法一次要写，不然会有问题
+ (instancetype)allocWithZone:(struct _NSZone *)zone
{
    static TopWindowViewController* instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [super allocWithZone:zone];
    });
    return instance;
}

- (BOOL)prefersStatusBarHidden {
    return self.isStatusBarHidden;
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return self.statusBarSty;
}

- (void)setStatusBarHidden:(BOOL)statusBarHidden {
    _statusBarHidden = statusBarHidden;
    [self setNeedsStatusBarAppearanceUpdate];
}

- (void)setStatusBarSty:(UIStatusBarStyle)statusBarSty {
    _statusBarSty = statusBarSty;
    [self setNeedsStatusBarAppearanceUpdate];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
